import {httpRequest} from "../request";

module.exports = {
  
  save(params) {
    return httpRequest({
      'url': '/user/save',
      'method': 'post',
      'params': params
    });
  },

  invalid(params) {
    return httpRequest({
      'url': '/user/invalid',
      'method': 'get',
      'params': params
    });
  },

  queryByCondition(params) {
    return httpRequest({
      'url': '/user/queryByCondition',
      'method': 'post',
      'params': params
    });
  },

  sendVerificationCode() {
    return httpRequest({
      'url': '/user/sendVerificationCode',
      'method': 'post',
    });
  },

  updatePassword(params) {
    return httpRequest({
      'url': '/user/updatePassword',
      'method': 'post',
      'params': params,
      'header': {
        'Content-Type': 'application/x-www-form-urlencoded' 
      }
    });
  },

  updateEmail(params) {
    return httpRequest({
      'url': '/user/updateEmail',
      'method': 'post',
      'params': params,
      'header': {
        'Content-Type': 'application/x-www-form-urlencoded' 
      }
    });
  },

}